home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2000 September / maximum-cd-2000-09.iso / Vampire the Masquerade / vampire_demo.exe / Codex.nob / StingerSound.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-06-22  |  1.6 KB  |  32 lines

  1. public class StingerSound extends Codex {
  2.    private String _soundName;
  3.    private float _minDist;
  4.    private float _maxDist;
  5.    private int _volume;
  6.    private int _pan;
  7.    private int _flags;
  8.    private float _minFrequency;
  9.    private float _maxFrequency;
  10.    public static String[] _params = new String[]{"Sound name", "Min Distance;300", "MaxDistance;600", "Volume;75", "Pan;0", "Flags;0", "Min Frequency;5", "Max Frequency;10"};
  11.  
  12.    public void beginscene(int clientGuid, int captureID) {
  13.       ((Codex)this).SetTimer((float)((double)this._minFrequency + Math.random() * (double)(this._maxFrequency - this._minFrequency)));
  14.    }
  15.  
  16.    public StingerSound(String soundName, float minDist, float maxDist, int volume, int pan, int flags, float minFrequency, float maxFrequency) {
  17.       this._soundName = soundName;
  18.       this._minDist = minDist;
  19.       this._maxDist = maxDist;
  20.       this._volume = volume;
  21.       this._pan = pan;
  22.       this._flags = flags;
  23.       this._minFrequency = minFrequency;
  24.       this._maxFrequency = maxFrequency;
  25.    }
  26.  
  27.    public void timer(int timerID, float arg0, float arg1, float arg2, float arg3) {
  28.       new CodexSound(this._soundName, this._minDist, this._maxDist, this._volume, this._pan, this._flags, ((Codex)this).GetClassThing());
  29.       ((Codex)this).SetTimer((float)((double)this._minFrequency + Math.random() * (double)(this._maxFrequency - this._minFrequency)));
  30.    }
  31. }
  32.